]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Replace removed Meta.quit()
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 16 Jul 2021 19:39:51 +0000 (21:39 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 18 Jul 2021 21:11:43 +0000 (23:11 +0200)
This one was moved to Meta.Context as well.

I don't know why the `debugexit` command quit with an error code
(it dates back all the way to commit 98bd590a5d). Terminating on
request by the user doesn't sound like an error, so don't replicate
that particular behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1917>

js/ui/runDialog.js
js/ui/screenShield.js

index bc9689d4d183a6abdb7505fe4169edc43dde8d67..cf835972ea440b0b86cba85c0538bb16fb02aae6 100644 (file)
@@ -42,7 +42,7 @@ class RunDialog extends ModalDialog.ModalDialog {
             // Developer brain backwards compatibility
             'restart': this._restart.bind(this),
 
-            'debugexit': () => Meta.quit(Meta.ExitCode.ERROR),
+            'debugexit': () => global.context.terminate(),
 
             // rt is short for "reload theme"
             'rt': () => {
index a1b32aa6bae0a3c5a550983bb3fd220730a01f63..59c13d8b5f88fe62a2b02d5737fe8180a64ea9e6 100644 (file)
@@ -324,8 +324,10 @@ var ScreenShield = class {
     showDialog() {
         if (!this._becomeModal()) {
             // In the login screen, this is a hard error. Fail-whale
-            log('Could not acquire modal grab for the login screen. Aborting login process.');
-            Meta.quit(Meta.ExitCode.ERROR);
+            const error = new GLib.Error(
+                Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED,
+                'Could not acquire modal grab for the login screen. Aborting login process.');
+            global.context.terminate_with_error(error);
         }
 
         this.actor.show();